package com.qqin.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

//配置Spring MVC的资源处理器，使得Spring MVC能够正确地处理静态资源请求。
@Configuration
public class SpringConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/image/**", "/imagegoods/**")
                .addResourceLocations("file:image/", "file:imagegoods/");
    }
}
